//
//  ScratchViewController.m
//  wuliangye
//
//  Created by jarze on 16/2/19.
//  Copyright © 2016年 jarze. All rights reserved.
//

#import "ScratchViewController.h"
#import "UIImage+ImageEffects.h"
#import "MDScratchImageView.h"

@interface ScratchViewController ()

@end

@implementation ScratchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setUp];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setUp
{
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
    imageView.image = [UIImage imageNamed:@"4"];
    [self.view addSubview:imageView];
    
    UIImage *blur = [imageView.image blurImage];
    
    MDScratchImageView *scratchImageView = [[MDScratchImageView alloc] initWithFrame:self.view.bounds];
    [scratchImageView setImage:blur radius:20.f];
    [self.view addSubview:scratchImageView];
    
}

@end
